<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/dl_houtai.css" />
		<link rel="stylesheet" type="text/css" href="css/dl_putou.css" />
		<link rel="stylesheet" type="text/css" href="css1/css.css"/>
		<script src="js/jquery-1.12.4.js" ></script>
	</head>
	<body>
		<div class="" id="houtai_tou">
			<h2>会员中心</h2><a href="">首页</a>
		</div>
		<div class="zhong">
			<!-- 普通用户登录后的 -->
			<div id="zuo_kehu">
				<ul>
					<li>
						<h2><span class="tu1"><img src="images/h1.png"></span>客户中心</h2>
						<div class="zuo_a2">
							<p id="pt_geren">个人信息</p>
							<p id="pt_xgxx">修改密码</p>
						</div>
						<div class="zuo_a1">
							<p id="pt_shouhuo">收货地址</p>
						</div>
					</li>
				</ul>
				<ul>
					<li>
						<h2><span class="tu1"><img src="images/h2.png"></span>交易管理</h2>
						<div class="zuo_a2">
							<p id="pt_goumai">购买历史</p>
							<p id="">退货</p>
						</div>
						<div class="zuo_a1">
						</div>
					</li>
				</ul>
				<ul>
					<li>
						<h2><span class="tu1"><img src="images/h3.png"></span>物流情况</h2>
						<div class="zuo_a2">
							<p id="pt_zls">物流查询</p>
						</div>
						<div class="zuo_a1">
						</div>
					</li>
				</ul>
			</div>
			<div id="you">
				<div id="zhongxin_tu" class="maichu">
					<div id="">

					</div>
				</div>
				
				<!--购买历史  -->
				<div id="pt_gmls" class="maichu">
					<div class="tou">
						<ul>
							<li>购买历史</li>
						</ul>
					</div>
					<div class="biao_tou">
						<ul>
							<li>宝贝</li>
							<li>单价</li>
							<li>数量</li>
							<li>宝贝总价</li>
							<li>总金额</li>
							<li>收货地址</li>
							<li>交易操作</li>
						</ul>
					</div>
					
					<c:forEach items="${order}" var="orders">
					<c:forEach items="${orders.list }" var="shop">
					<div class="biao_tou1">
						<ul>
							<li>订单号：${orders.orderid }</li>
							<li></li>
						</ul>	
						<ul>
						
							<li>
								<!-- 商品的图片 -->
								<div class="tu">
									<img src="upload/${shop.shopimg}">
								</div>
								
								<!-- 商品的标题 -->
								<p id="tu_p">${shop.shopname}</p>						
							</li>
							<li class="li"><span>${shop.shoporice }</span></li>
							<li class="li"><span>${shop.kucun }</span></li>
							<li class="li"><span>${shop.shoporice}</span></li>
							<li class="li"><span>${orders.amount}</span></li>
							<li class="li"><span>${orders.address}</span></li>
							<li class="li"><span>删除订单</span></li>
						</ul>
					</div>
					</c:forEach>
					</c:forEach>
				</div>
				
				<!-- 新增收货地址 -->
				<div class="nav shade_content_div" id="shade_content_div">
					<div class="col-xs-12 shade_title">
						新增收货地址
					</div>
					<div class="col-xs-12 shade_from">
						<form action="address" method="post">
							<div class="col-xs-12">
								<span class="span_style" id="">地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;区</span>
								<input class="input_style" type="" name="region" id="region" value="" placeholder="&nbsp;&nbsp;请输入您的所在地区" />
							</div>
							<div class="col-xs-12">
								<span class="span_style" id="">详细地址</span>
								<input class="input_style" type="" name="address" id="address" value="" placeholder="&nbsp;&nbsp;请输入您的详细地址" />
							</div>
							<div class="col-xs-12">
								<span class="span_style" class="span_sty" id="">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名</span>
								<input class="input_style" type="" name="name" id="name" value="" placeholder="&nbsp;&nbsp;请输入您的姓名" />
							</div>
							<div class="col-xs-12">
								<span class="span_style" id="">手机号码</span>
								<input class="input_style" type="" name="phone" id="phone" value="" placeholder="&nbsp;&nbsp;请输入您的手机号码" />
							</div>
							<div class="col-xs-12">
								<input class="btn_remove" type="button" id="" onclick="javascript:onclick_close();" value="取消" />
								<input type="submit" class="sub_set" id="sub_setID" value="提交" />
							</div>
						</form>
					</div>
				</div>
				<!--在路上的产品  -->
				<div id="pt_zailushang" class="maichu">
					<div class="tou">
						<ul>
							<li>在路上</li>
						</ul>
					</div>
					<div class="biao_tou">
						<ul>
							<li>宝贝</li>
							<li>单价</li>
							<li>数量</li>
							<li>商品操作</li>
							<li>实付款</li>
							<li>交易状态</li>
							<li>交易操作</li>
						</ul>
					</div>
					<div class="biao_tou1">
						<ul>
							<li>订单号：</li>
							<li></li>
						</ul>
						<ul>
							<li>
								<!-- 商品的图片 -->
								<div class="tu">
									<img src="images/dd1.jpg">
								</div>
								<!-- 商品的标题 -->
								<p id="tu_p">单方事故是大法官第三方</p>
							</li>
							<li class="li"><span>12.00</span></li>
							<li class="li"><span>1</span></li>
							<li class="li"><span>退款</span></li>
							<li class="li"><span>12.00</span></li>
							<li class="li"><span>已支付</span></li>
							<li class="li"><span>运输中</span></li>
						</ul>
					</div>
				</div>
				<!-- 修改信息 -->
				<form action="modPwd" method="post">
					<div id="pt_xiugaixinxi" class="maichu">
						<div class="tou">
							<ul>
								<li>修改密码</li>
							</ul>
						</div>
						<div class="biao_tou1 tianjia_lingshi">
							<span class="pt_mima_xiugai">原&nbsp;密&nbsp;&nbsp;码:</span>
							<input type="" name="oldpwd" id="oldpwd"  /><span id="old"></span><br>
							<span class="pt_mima_xiugai">新&nbsp;密&nbsp;码:</span>
							<input type="" name="newpwd1" id="newpwd1"  /><br>
							<span class="pt_mima_xiugai"> 确认&nbsp;密&nbsp;码:</span>
							<input type="" name="newpwd2" id="newpwd2"  /><span id="new"></span><br>


							<input type="submit" class="pt_tj" name="" id="tiqu" value="提交" />
							<input type="button" class="pt_tj" name="" id="tiu" value="取消" />
						</div>
					</div>
				</form>
				<script type="text/javascript">
				$(function(){
				$("#oldpwd").blur(function(){
					$("#old").html("");
					$.getJSON("pwd",{"oldpwd":$(this).val()},function(pwd){	
                        //用于将符合标准格式的的JSON字符串转为与之对应的JavaScript对象
                        var panding="";
                        if(pwd=="1"){
                        	panding="√";
                        	$("#tiqu").attr("disabled",false);
                        }else{
                        	panding="密码错误";
                        	$("#tiqu").attr("disabled",true);
                        }
                            $("#old").append(panding);
                         });
				})
				$("#newpwd2").blur(function(){
					$("#new").html("");
					var new1=$("#newpwd1").val();
					var new2=$("#newpwd2").val();
					if(new1!=new2){
						$("#new").append("密码不一致");
						$("#tiqu").attr("disabled",true);
					}else{
						$("#tiqu").attr("disabled",false);
					}   
				})
				})
				</script>
				<!-- 客户详情信息 -->
				<div id="pt_xinxi_span" class="maichu">
					<div class="tou">
						<ul>
							<li>个人信息显示</li>
						</ul>
					</div>
					<div class="pt_xinxi">
						<ul id="xinxi">
							
						</ul>
					</div>
					<script type="text/javascript">
					$(function(){
				        $.getJSON("user",function(users){	
				         //用于将符合标准格式的的JSON字符串转为与之对应的JavaScript对象
				         var status="正常";
				         if(users.userStatus==0){
				        	 status="封禁";
				         }
				             $("#xinxi").append("<li>账号：<span >"+users.account+"</span></li>"
										+"<li>名字：<span >"+users.userName+"</span></li>"
										+"<li>身份证号：<span >"+users.cardId+"</span></li>"
										+"<li>手机：<span >"+users.phone+"</span></li>"
										+"<li>注册日期：<span >"+users.date+"</span></li>"
										+"<li>地址：<span >"+users.site+"</span></li>"
										+"<li>账号状态：<span >"+status+"</span></li>");				             
				         
				          });
					         });
					
					</script>
				</div>
			</div>
		</div>
		<script src="js/dl_putong.js" type="text/javascript" charset="utf-8"></script>
	</body>
</html>

